package cn.scw.project.facility.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备报修对象 fac_facility_repairs
 *
 * @author api
 * @date 2020-05-20
 */
public class FacFacilityRepairs extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 设备编码 */
    @Excel(name = "设备编码")
    private String facilityCode;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户电话 */
    @Excel(name = "用户电话")
    private String userPhone;

    /** 故障类型（工单类型）——字典表维护 */
    @Excel(name = "故障类型", readConverterExp = "工=单类型")
    private String faultTypeCode;

    /** 故障详情 */
    @Excel(name = "故障详情")
    private String faultDetails;

    /** 上报日期 */
    @Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date faultDate;

    /** 是否解决 */
    @Excel(name = "状态", readConverterExp = "是否解决")
    private boolean isSolve=false;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setFacilityCode(String facilityCode)
    {
        this.facilityCode = facilityCode;
    }

    public String getFacilityCode()
    {
        return facilityCode;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUserPhone(String userPhone)
    {
        this.userPhone = userPhone;
    }

    public String getUserPhone()
    {
        return userPhone;
    }
    public void setFaultTypeCode(String faultTypeCode)
    {
        this.faultTypeCode = faultTypeCode;
    }

    public String getFaultTypeCode()
    {
        return faultTypeCode;
    }
    public void setFaultDetails(String faultDetails)
    {
        this.faultDetails = faultDetails;
    }

    public String getFaultDetails()
    {
        return faultDetails;
    }
    public void setFaultDate(Date faultDate)
    {
        this.faultDate = faultDate;
    }

    public Date getFaultDate()
    {
        return faultDate;
    }

    public boolean isSolve() {
        return isSolve;
    }

    public void setSolve(boolean solve) {
        isSolve = solve;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("facilityCode", getFacilityCode())
            .append("userId", getUserId())
            .append("userPhone", getUserPhone())
            .append("faultTypeCode", getFaultTypeCode())
            .append("faultDetails", getFaultDetails())
            .append("faultDate", getFaultDate())
            .append("isSolve", isSolve())
            .toString();
    }
}
